package com.suning.boot.service;

import com.suning.boot.entity.User;
import com.suning.boot.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


@Service
public class UserService {

    @Autowired
    UserRepository userRepository;

    @Transactional
    public void addTwo(User user){
        userRepository.save(user);
    }


}
